Profile    Mohammed Shiroz Status   Loading  
Logo
Share This

My php
blog and Updates

It's my personal blog and my post about what was my interested in. Not regularly. If you have any questions any discussion, I'm happy you get in touch with me, and try to answer as many as possible!

Blog
Let's See
Back to blog
Filter by:
Tags
//Article

Clean Error Handling in Laravel APIs: One Format, No Leaked Stack Traces

Clean Error Handling in Laravel APIs: One Format, No Leaked Stack Traces

Blog Summary

Your API's happy path is tidy. Its errors are a mix of HTML pages, stack traces and five different JSON shapes. Here's how to give every Laravel 12 API error one predictable format, from bootstrap/app.php.

Read more
  • 131
  • 104
  • 14

Laravel Octane: What It Is, When It Helps, and the State Leaks Nobody Warns You About

Laravel Octane: What It Is, When It Helps, and the State Leaks Nobody Warns You About

Blog Summary

Octane keeps your Laravel app booted in memory, so requests skip the startup cost. It also means state can survive from one user's request into the next. Here's how it works, the classic leaks, and when it's worth it.

Read more
  • 32
  • 58
  • 8

State Machines for Business Workflows: Stop Letting Any Code Set Any Status

State Machines for Business Workflows: Stop Letting Any Code Set Any Status

Blog Summary

A contract that was signed after it was terminated. An order refunded before it was paid. Impossible records come from status columns anyone can write. Here's how a small state machine with PHP enums makes them impossible.

Read more
  • 119
  • 32
  • 11

Laravel Pint, PHPStan and Rector: Automatic Code Quality Without the Arguments

Laravel Pint, PHPStan and Rector: Automatic Code Quality Without the Arguments

Blog Summary

Too much code review goes on missing spaces, unused imports and possible nulls. Pint, PHPStan with Larastan and Rector catch all of that automatically. Here's the setup, the baseline trick and the CI job.

Read more
  • 48
  • 107
  • 8

Laravel Testing With Fakes: Mail, Queue, Http, Storage and Notifications

Laravel Testing With Fakes: Mail, Queue, Http, Storage and Notifications

Blog Summary

Your test suite shouldn't send real emails, hit a real payment API or fill a real S3 bucket. Laravel's fakes swap all of that out in one line. Here's how each one works, and the gotchas that make tests pass for the wrong reason.

Read more
  • 125
  • 124
  • 19

How a Hash Map Works (and Why Your PHP Array Is Secretly One)

How a Hash Map Works (and Why Your PHP Array Is Secretly One)

Blog Summary

Finding one item among millions without searching sounds like cheating. It's a hash map. Buckets, hash functions, collisions, why lookups are O(1) on average, a 2011 security scare, and what it means for PHP arrays.

Read more
  • 127
  • 56
  • 10

01. About Shiroz

Mohammed Shiroz

Hi, I'm Mohammed Shiroz, a software engineer and AI enthusiast from Sri Lanka who turns ideas into intelligent, real-world solutions. With over 9 years of hands-on experience, I currently lead real estate ERP development at Kate Group, a...

03.My Projects

04. Categories

Ready To Start Your Project ?

Get in Touch
Close